import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Card, Button, Input, Icon, message, Modal, Pagination, Spin, Progress, Popconfirm } from 'antd';
import styles from './videolist.less';

export default class Album extends PureComponent {
  state = {
    actionType: 'interactive', // or putong
  }

  switchAction = (type) => {
    if(this.state.actionType !== type) {
      this.setState({actionType: type})
    }
  }


  render() {
    let {actionType} =this.state
    return (
      <div>
        <header className={styles['header']}>
          <div>
            <Button
              type={actionType === 'interactive'? 'primary': ''}
              style={{borderRadius: 16, margin: '0 10px'}}
              onClick={() => this.switchAction('interactive')}
            >互动视频</Button>
            <Button
              type={actionType === 'default' ? 'primary': ''}
              style={{borderRadius: 16}}
              onClick={() => this.switchAction('default')}
            >普通视频</Button>
          </div>
          <div>
            <Button style={{margin: '0 10px'}}>上传普通视频</Button>
            <Button>新增互动视频</Button>
          </div>
        </header>

        <div style={{marginTop: 20}}>
          {actionType=== 'interactive' &&
            <Card>
              <Spin>

              </Spin>
            </Card>
          }
        </div>
      </div>
    );
  }
}
